
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link href="../../build/common/base.css" rel="stylesheet">
	<script type="text/javascript" src="../../build/common/base.js"></script>
	<script type="text/javascript" src="../../build/common/gridList.js"></script>
	<script type="text/javascript" src="../../build/common/easyLayout.js"></script>
	<script type="text/javascript" src="../../assets/js/common/tools/businessPermissionUtil.js"></script>
	<script type="text/javascript">
        function openEdit(id) {
            $.openFullWindow("formDefEdit.html?formType="+$.getParam("formType")+"&id=" + (id ? id : ""));
        }
        function genCode(){
            var arrays = $("[ab-grid]").bootstrapTable('getSelections');
            if(!arrays || arrays.length==0){
                $.Dialog.msg('请至少选择一个表单!');
                return;
            }
            var config = {
                title:"代码生成",
                url: './codeGen.html',
                passData: arrays,
            }
            $.Dialog.open(config);
        }

	</script>
</head>
<body class="easy-layout">
<div data-options="region:'west',split:true,border:true,title:'分类'" style="width: 180px;">
	<div sysTreeGroup treeKey="bdfl" groupColumn="a.group_id_"></div>
</div>

<div data-options="region:'center',border:false">
	<div class="panel panel-default search-panel bbn">
		<div class="panel-heading">
			查询条件
			<a href="javascript:void(0)" class="pull-right">
				<i class="fa fa-angle-double-up" toggle-collapse="#searchForm"></i>
			</a>
		</div>
		<div class="panel-body">
			<form id="searchForm" class="form-horizontal">
				<div class="form-group" style="margin-right: 0px;">
					<label class="control-label col-sm-1" for="key_^VLK">别名</label>
					<div class="col-sm-2">
						<input type="text" class="form-control" id="key_^VLK">
					</div>
					<label class="control-label col-sm-1" for="name_^VLK">名称</label>
					<div class="col-sm-2">
						<input type="text" class="form-control" id="name_^VLK">
					</div>
					<label class="control-label col-sm-1" for="name_^VLK">业务对象别名</label>
					<div class="col-sm-2">
						<input type="text" class="form-control" id="bo_key_^VLK">
					</div>
					<label class="control-label col-sm-1" for="name_^VLK">业务对象名称</label>
					<div class="col-sm-2">
						<input type="text" class="form-control" id="bo_name_^VLK">
					</div>
					<div class="col-sm-4 mt5" style="text-align: left;">
						<button type="button" style="margin-left: 50px" class="btn btn-primary fa-search">查询</button>
						<button type="button" style="margin-left: 50px" class="btn btn-primary fa-rotate-left">重置</button>
					</div>
				</div>
			</form>
		</div>
	</div>
	<div class="btn-group toolbar">
		<button class="btn btn-outline btn-primary fa-plus mr5" onclick="openEdit()">新增</button>
		<button class='btn btn-outline btn-primary fa fa-code'  onclick="genCode()" >代码生成</button>
	</div>
	<table ab-grid data-id-field="id" data-url="/form/formDef/listJson?formType={formType}">
		<thead>
		<tr>
			<th data-checkbox="true">ID</th>
			<th data-field="key">别名</th>
			<th data-field="name">名称</th>
			<th data-field="groupName">分类</th>
			<th data-field="boKey">业务对象别名</th>
			<th data-field="boName">业务对象名称</th>
			<th data-formatter="innerHtmlFormatter" data-title="管理">
				<span class='btn btn-outline btn-primary fa-edit' qtip='编辑' onclick="openEdit('{id}')"></span>
				<span class='btn btn-outline btn-primary fa-user-times' qtip='权限' onclick="BusinessPermission.openDialog('form','{key}','{boKey}')"></span>
				<span class='btn btn-outline btn-primary fa fa-trash' sendAction='删除' qtip='删除' url='/form/formDef/remove?id={id}'></span>
				<span class='btn btn-outline btn-primary fa-list' qtip='表单数据'  openDialog='业务数据列表' url='./formDefDataList.html?boKey={boKey}&key={key}&formType={url.formType}'></span>
			</th>
		</tr>
		</thead>
	</table>
</div>
</body>
</html>